package baseKnowledge.sortAlgorithm;

public class InsertSort {
    public int[] bubleSort(int[] a){
        if(a.length==0)
            return a;
        for (int i=0;i<a.length;i++)
            for (int j=0;j<a.length-1-i;j++)
                if (a[j+1]<a[j]){
                    int temp=a[j+1];
                    a[j+1]=a[j];
                    a[j]=temp;
                }

        return a;
    }
}
